
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[EBAS_STANDARD_VAERDI]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[EBAS_STANDARD_VAERDI]
GO

CREATE TABLE [dbo].[EBAS_STANDARD_VAERDI] (
	[GUID]  uniqueidentifier ROWGUIDCOL  NOT NULL ,
	[KOMPONENT_NAVN] [varchar] (255) COLLATE Danish_Norwegian_CI_AS NOT NULL ,
	[VAERDI] [varchar] (255) COLLATE Danish_Norwegian_CI_AS NOT NULL ,
	[POSITION] [int] NULL ,
	[DEAKTIVERET] [bit] NOT NULL ,
	[SKJULT] [bit] NOT NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[EBAS_STANDARD_VAERDI] WITH NOCHECK ADD 
	CONSTRAINT [DF_EBAS_STANDARD_VAERDI_GUID] DEFAULT (newid()) FOR [GUID],
	CONSTRAINT [DF_EBAS_STANDARD_VAERDI_DEAKTIVERET] DEFAULT (0) FOR [DEAKTIVERET],
	CONSTRAINT [DF_EBAS_STANDARD_VAERDI_SKJULT] DEFAULT (0) FOR [SKJULT],
	CONSTRAINT [DF_EBAS_STANDARD_VAERDI_POSITION] DEFAULT (-1) FOR [POSITION],
	CONSTRAINT [PK_STANDARD_VAERDI] PRIMARY KEY  CLUSTERED 
	(
		[GUID]
	)  ON [PRIMARY] 
GO

INSERT INTO EBAS_STANDARD_VAERDI (KOMPONENT_NAVN, VAERDI)
VALUES ('IDC_COMBO_ADRESSE_TYPE', 'Firma')
INSERT INTO EBAS_STANDARD_VAERDI (KOMPONENT_NAVN, VAERDI)
VALUES ('IDC_COMBO_STAMDATA_IDENTIFIKATION','Certificate')
INSERT INTO EBAS_STANDARD_VAERDI (KOMPONENT_NAVN, VAERDI)
VALUES ('IDC_COMBO_STAMDATA_STATUS','Interesseret')
GO

